function isValidEmailAddress(emailAddress) 
{
	var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
	return pattern.test(emailAddress);
}

$(document).ready(function(){
	$('#btn_send_comment_submit').click(function(){
		
		var commentName = $('#fullname').val();
		var commentEmail = $('#email').val();
		var commentCaptcha = $('#captcha').val();
		var commentMessage = $('#message').val();
		
		var tamp='';
		if(commentName == '')
		{
			tamp += 'Please enter fullname.';
		}
		if(commentEmail == '')
		{
			tamp += '\n Please enter your email.';
		}
		if(!isValidEmailAddress(commentEmail))
		{
			tamp += '\n The email invalid.';
		}
		if(commentMessage == '')
		{
			tamp += '\n Please enter your message.';
		}
		if(commentCaptcha == '')
		{
			tamp += '\n Please enter your captcha.';
		}
		if(tamp != '')
		{
			alert(tamp);
			return false;
		}
		else
			return true;
	});	
});